package com.alix.paymoney.base;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;



/**
 * com.dafenci.android.teach.base
 * 公司:浙江答分奇网络科技有限公司
 * created by 吴世芊 on 2016/10/9 11:01.
 * updated by
 * 邮箱:apple9302@126.com
 * 此类功能:
 */

public class ViewHolder extends RecyclerView.ViewHolder {
    private SparseArray<View> mViews;
    private View mConvertView;
    private Context mContext;
    protected int mLayoutId;

    public ViewHolder(View itemView, Context mContext) {
        super(itemView);
        this.mContext = mContext;
        this.mConvertView = itemView;

    }

    public ViewHolder(View itemView) {
        super(itemView);
        this.mConvertView = itemView;
    }
    public ImageView getImageView(int id) {
        return (ImageView) mConvertView.findViewById(id);
    }

    public TextView getTextView(int id) {
        return (TextView) mConvertView.findViewById(id);
    }
    public View getView(int id){
        return  mConvertView.findViewById(id);
    }
    public Button getButton(int id) {
        return (Button) mConvertView.findViewById(id);
    }
    public LinearLayout getLinearLayout(int id) {
        return (LinearLayout) mConvertView.findViewById(id);
    }
    public RelativeLayout getRelativeLayout(int id) {
        return (RelativeLayout) mConvertView.findViewById(id);
    }
    public FrameLayout getFrameLayout(int id) {
        return (FrameLayout) mConvertView.findViewById(id);
    }
    public RecyclerView getRecyclerView(int id) {
        return (RecyclerView) mConvertView.findViewById(id);
    }


}
